package com.bilicute.libman.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

/**
 * @所属包名: com.bilicute.libman.pojo
 * @类名: Book
 * @作者: i囡漫笔
 * @描述: 图书实体类
 * @创建时间: 2024-06-21 14:16
 */

@Data
@Validated
public class Book {
    private Integer book_id;
    @NotBlank(message = "书名为空")
    private String book_name;
    @NotBlank(message = "ISBN为空")
    private String book_isbn;
    @NotBlank(message = "出版社为空")
    private String book_press;
    @NotBlank(message = "作者为空")
    private String book_author;
    @NotBlank(message = "总页数为空")
    private String book_pagination;
    @NotNull(message = "价格为空")
    private double book_price;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String book_uploadtime;
    private String book_status;
    private Integer book_borrower;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String book_borrowtime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String book_returntime;
    private String record_id_in_book;
}
